Skip to content

cockpit: one cockpit for everyone, a sidebar, Home and Demos - #229

Merged
LittleChimera merged 2 commits into
stagingfrom
factory/ui-cockpit
Nov 6, 2026
Merged

LittleChimera merged 2 commits into
stagingfrom
factory/ui-cockpit

Conversation

@LittleChimera

Copy link
Copy Markdown

Related issue

Closes # (cockpit UI iteration, part 1 of 3; supersedes #224)

Summary

Luka: "i can't find anything", "navigating the levels makes no sense", "i cannot find demos", "ship … without any feature flags like ?cockpit=3". This makes one cockpit for everyone and gives it one way around.

ELI5: every factory page now has the same left sidebar. Click Home to see what needs you and your features, Demos to watch what the factory built, Chats for conversations, Decisions for what you have to answer. Under that, the list of features; open one to see its projects. The level strip at the top is gone; a node page has a plain "Home › Feature › Project" breadcrumb.

┌ Sample app ▾ ───┐  Sample app
│ ⌂ Home          │  NEEDS YOU
│ ▶ Demos         │   ● Apply C-16 · …                       [Apply]
│ 💬 Chats      9 │  FEATURES                           All demos ›
│ ✓ Decisions   5 │   ◔ Agent assistant   4 need you  2/6  [▶ 0:42]
│ ⌕ Search     ⌘K │   ○ Build tier drafts 3           0/2  [▶ 0:11]
│ WORK            │  RECENTLY SHIPPED
│ › Agent assist. │   ✓ Connector core · Connectors core  [▶ 0:18]
│   · Build tier  │
│ › Done · 1      │
│ The factory   3 │
└─────────────────┘   (phone: Home Demos Chats Decisions Search at the bottom)
  • No flags. useCockpitV2 always answers v3; ?cockpit= is dropped. Older addresses land on the place that shows the same thing now (cockpitTarget): /projects/<slug> → /n/<slug> (the team editor /projects/<slug>/team stays), /prs/<id> and ?review= → /n/PR-<n>, /initiatives/<ref> → /n/<ref>, /room[/<t>] and ?room= → /chats[/<t>], ?peek=needs → /decisions. projectPageHref, initiativePageHref and roomPageHref build the new addresses directly. The classic shell and the v2 shell (CockpitShell) are gone; the earlier pages behind Debug still render.
  • Sidebar + outline (components/factory/cockpit/CockpitNav.tsx, pages/factory/Cockpit.tsx): places with counts (unread chats, open asks), Search (⌘K), the work outline (features → projects, current node highlighted, prefetch on hover), then The factory, Settings, Debug, theme. Phones get a bottom tab bar.
  • Home (CockpitHome.tsx): needs you (3, rest on Decisions), features one line each with progress and a ▶ that plays the latest demo in place, recently shipped with their demo. Nothing else.
  • Demos (DemosPage.tsx): newest first, poster, verdict, what was partial, feature › project, length, age; one click plays it in place and scrolls it into view (above sticky bars); filters by feature and verdict in the address (?feature=, ?verdict=, ?play=). Server: GET …/n/{ref}/demos items now carry feature, project and merged_at.
  • Chats list (ChatsPage.tsx): every thread, the ones you wrote in first, then newest, unread counts and the last line said. Server: GET …/chat/threads adds mine and last (one grouped query, chat_thread_said). Opening a thread still goes to its node's chat; the messenger view is part 2.
  • Decisions page: the ranked asks as a page (plain words and history are part 3).
  • cockpit v3: demos are never hidden #224 folded in (proof rows, node demo fields, Demos sheet) with its judge issues fixed: the player scrolls into view on phone and laptop; the chat's demo card plays in place (no navigation to the PR page) and shows no !9876 or SHA; Home's chip never squeezes names on a phone.
  • The node chat column defaults narrower (30 %, ≤ 480 px; beside the page from 1180 px) so the page keeps room next to the sidebar.

Test Plan

  • npx vitest run (whole web suite): 548 files, 10370 tests green; tsc -b, oxlint, prettier --check clean.
  • New pages/factory/Cockpit.test.tsx (17): sidebar places and outline, outline marks the node, Home sections, Demos filter and play in place and ?play=, Chats order (mine first) with unread and last line, every older address lands where it should, the team editor keeps its address, no cockpit-choice reads.
  • pytest tests/server/factory/test_node_proof.py tests/server/factory/test_node_threads.py (47, two new: demos list says where each sits; thread list says mine and last line).
  • pytest tests/e2e_ui/factory_v3 on a real server with the 13:40 seed: 30 passed, incl. new test_the_demos_page_lists_every_demo_and_plays_it_in_view at 1440 and 390 (player inside the viewport, video playing).
  • Deliberate test removals: the tests of the retired classic and v2 shells and of pages that are now only redirects (FactoryPage, CockpitShell, CockpitV3, HomePage, ProjectPage, ProjectPageV2, ProjectsPageV2, RoomPage, InitiativePage, the classic Settings / Improvements / Agents / Loop tests in LearnPages and OpsPages, the cockpit-switch tests in TeamsPage), and the level-strip tests (replaced by breadcrumb tests).
  • tests/examples/test_factory_sample_tokens.py green.

Demo

Screenshots (1440 light/dark, 390) are in wt/v3-tmp/ui-cockpit/shots/pr1/ on the build machine (home, demos, chats, decisions, feature, project); attachment upload is not available from this session.

Type of change

  • Bug fix
  • Feature
  • UI / frontend change
  • Refactor / chore
  • Docs
  • Test / CI
  • Breaking change

Test coverage

  • Unit tests added / updated
  • Integration tests added / updated
  • E2E tests added / updated
  • Manual verification completed
  • Existing tests cover this change
  • Not applicable

Coverage notes

Manual: clicked through Home, Demos (filters, play), Chats, Decisions, a feature and a project at 1440 and 390 against a local server seeded with seed_factory_1340. Breaking: there is no classic or v2 cockpit any more; their page components stay in the tree (Storybook) and are to be removed next release.

Changelog

The factory cockpit is one cockpit for everyone, with a sidebar (Home, Demos, Chats, Decisions, Search, the work outline) and a Demos page that plays every recording in place

🤖 Generated with Claude Code

LittleChimera and others added 2 commits November 6, 2026 10:50
Node pages carry their recorded demos: a change and its task show the demo
of the PR's current head, a project its newest across its PRs, a feature its
acceptance run's recording (else its newest project demo), each with verdict,
short title, length, poster and video (the demo file routes), PR and a
one-line note on what did not pass. Feature rows carry Home's play chip.
GET .../n/{ref}/demos lists the subtree newest first; viewers see only the
demos of PRs they may read. Demo cards in the node chat are conversation.

The web shows one "Latest demo · PASS · 0:14 ▶" row under Your move that
plays in place with the PR page's player, a Demos sheet behind "n more
demos", and a ▶ chip on Home's feature rows. The calm gates hold the proof
row to its own few words, the e2e seed records demos with posters and
recordings, and the sample factory has demos for stories and tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- no cockpit switch: v3 is the cockpit at /factory/<fid> (?cockpit= dropped);
  older addresses (/projects/<slug>, /prs/<id>, /initiatives/<ref>, /room,
  ?review=, ?peek=needs) land on the place that shows the same thing now
- a sidebar always in view (Home, Demos, Chats, Decisions, Search, then an
  outline of features opening to their projects, the page's node marked);
  a bottom tab bar on phones; node pages keep a plain breadcrumb, the level
  strip is gone
- Home: what needs you (3), features one line each with a play chip for the
  latest demo, recently shipped changes with their demo
- Demos: every demo newest first, poster, verdict, what was partial, where it
  sits, length; plays in place and scrolls into view; filters by feature and
  verdict (server: demos list items carry feature, project, merged_at)
- Chats list (server: threads carry mine and last), Decisions page
- the chat's demo card plays in place, no PR number or commit on it
- proof rows from #224 (node demo fields, Demos sheet)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LittleChimera
LittleChimera merged commit 4ef0b20 into staging Nov 6, 2026
20 of 21 checks passed
@LittleChimera
LittleChimera deleted the factory/ui-cockpit branch November 6, 2026 09:51
@LittleChimera LittleChimera mentioned this pull request Nov 6, 2026
8 of 13 tasks
@github-actions github-actions Bot added the size/XL Pull request size: XL label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

❌ UI Snapshot doesn't match the committed baseline.

If this UI change is intentional, update the baseline — each path renders in the same pinned image, so the result matches this gate:

  • Label the PR (recommended): add the update-ui-snapshot label — the bot regenerates the baseline in the pinned image, pushes it back here, and re-runs the checks.
  • Locally with Docker: run tests/e2e_ui/visual/regen_baseline_docker.sh, review the PNG, then commit + push.

Diff PNGs (expected_=baseline, actual_=your render, diff_) are in the run artifact. Full guide: tests/e2e_ui/visual/README.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Pull request size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant